package models

import "gorm.io/gorm"

type Company struct {
	gorm.Model
	UserID int64
	Job    string
	Types  string
	Ads    string
	Salary float64
	Exp    string
	Degree string
}

func (c *Company) GetJobById() error {
	return DB.Where("id = ?", c.ID).Limit(1).Find(&c).Error
}

func (c *Company) Create() error {
	return DB.Create(c).Error
}

func (c *Company) DelById() error {
	return DB.Where("id=?", c.ID).Delete(&c).Error
}
